package com.oa.bean;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class CarApply {

	private Integer ca_id; //申请id
	private Integer ca_carno;  //
	private String uname;  //用车人
	private Date ca_starttime;  //用车开始时间
	private Date ca_stoptime;  //用车结束时间
	private String ca_cause;   //用车理由
	private String ca_destination;  //目的地
	private String ca_starte;   //申请状态
	private Date ca_time;   //申请时间
	private Integer ca_uid;
	private String cm_style;
	private String starttime;
	private String stoptime;
	private String stime;
	private String cm_carno;
	
	
	public String getCm_carno() {
		return cm_carno;
	}
	public void setCm_carno(String cm_carno) {
		this.cm_carno = cm_carno;
	}
	public Integer getCa_id() {
		return ca_id;
	}
	public void setCa_id(Integer ca_id) {
		this.ca_id = ca_id;
	}
	public Integer getCa_carno() {
		return ca_carno;
	}
	public void setCa_carno(Integer ca_carno) {
		this.ca_carno = ca_carno;
	}

	public String getUname() {
		return uname;
	}
	public void setUname(String uname) {
		this.uname = uname;
	}
	public Date getCa_starttime() {
		return ca_starttime;
	}
	public void setCa_starttime(Date ca_starttime) {
		SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		starttime  = sdf.format(ca_starttime);
		this.ca_starttime = ca_starttime;
	}
	public Date getCa_stoptime() {
		return ca_stoptime;
	}
	public void setCa_stoptime(Date ca_stoptime) {
		SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		stoptime = sdf.format(ca_stoptime);
		this.ca_stoptime = ca_stoptime;
	}
	public String getCa_cause() {
		return ca_cause;
	}
	public void setCa_cause(String ca_cause) {
		this.ca_cause = ca_cause;
	}
	public String getCa_destination() {
		return ca_destination;
	}
	public void setCa_destination(String ca_destination) {
		this.ca_destination = ca_destination;
	}
	
	public String getCa_starte() {
		return ca_starte;
	}
	public void setCa_starte(String ca_starte) {
		this.ca_starte = ca_starte;
	}
	public Date getCa_time() {
		return ca_time;
	}
	public void setCa_time(Date ca_time) {
		SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		stime = sdf.format(ca_time);
		this.ca_time = ca_time;
	}
	public String getStarttime() {
		return starttime;
	}
	public void setStarttime(String starttime) {
		SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		try {
			ca_starttime = sdf.parse(starttime);
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			
		}
		this.starttime = starttime;
	}
	public String getStoptime() {
		return stoptime;
	}
	public void setStoptime(String stoptime) {
		SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH");
		try {
			ca_stoptime = sdf.parse(stoptime);
		} catch (ParseException e) {
			// TODO Auto-generated catch block
		
		}
		this.stoptime = stoptime;
	}
	public String getStime() {
		return stime;
	}
	public void setStime(String stime) {
		SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH");
		try {
			ca_time = sdf.parse(stime);
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			
		}
		this.stime = stime;
	}
	public Integer getCa_uid() {
		return ca_uid;
	}
	public void setCa_uid(Integer ca_uid) {
		this.ca_uid = ca_uid;
	}
	public String getCm_style() {
		return cm_style;
	}
	public void setCm_style(String cm_style) {
		this.cm_style = cm_style;
	}
	
	@Override
	public String toString() {
		return "CarApply [ca_id=" + ca_id + ", ca_carno=" + ca_carno + ", uname=" + uname + ", ca_starttime="
				+ ca_starttime + ", ca_stoptime=" + ca_stoptime + ", ca_cause=" + ca_cause + ", ca_destination="
				+ ca_destination + ", ca_starte=" + ca_starte + ", ca_time=" + ca_time + ", ca_uid=" + ca_uid
				+ ", cm_style=" + cm_style + ", starttime=" + starttime + ", stoptime=" + stoptime + ", stime=" + stime
				+ "]";
	}
	
	
	
}
